<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$return['groupset']=plugin('jy_weishop')->plugin_setting('groupset');
	if($_RQ['pid']){
		$return['pid']=$_RQ['pid'];
	}else{
		$return['pid']=0;
	}
	$category=pdo_getall('jy_weishop_goods_group',array('uniacid'=>$_SESSION['uniacid'],'isshow'=>1,'parentid'=>0,'mid'=>0),array(),'id','paixu desc');
	foreach($category as &$item){
		$item['childs']=pdo_getall('jy_weishop_goods_group',array('uniacid'=>$_SESSION['uniacid'],'isshow'=>1,'parentid'=>$item['id']),array(),'id','paixu desc');
	}
	$searchkeyword=plugin('jy_weishop')->plugin_setting('search')['keyword'];
	$return['searchkeyword']=explode(';',$searchkeyword);
	$return['params']=$params;
	$return['category']=$category;
	//推荐
	$recommend=pdo_getall('jy_weishop_goods_group',array('uniacid'=>$_SESSION['uniacid'],'mid'=>0,'isshow'=>1,'isrecommand'=>1));
	$return['recommend']=$return['childs']=$recommend;
	$return['sharedata']=array(
		'title'=>$return['setting']['share_title']?'分类'.$return['setting']['share_title']:'分类-拼单商城',
		'desc'=>$return['setting']['share_desc']?$return['setting']['share_desc']:'拼单商城，一个属于自己的个人商城！',
		'link'=>custom_url('jy_pingdd_pin/groups//fromuser='.$_SESSION['uid'],true),
		'imgUrl'=>ATTACHMENT_URL.$return['setting']['share_image']
	);
	set_html('title','商品分类');	
	exi($return);
}
// js 获取数据
	
?>